home *** CD-ROM | disk | FTP | other *** search
/ Quick PC 61 / Quick PC 61.iso / I386 / NETFX.CAB / admin.chm / html / vs70link.js < prev   
Encoding:
Text File  |  2003-02-21  |  1.4 KB  |  48 lines

  1. // version 9104
  2.  
  3. writeCSS(scriptPath());
  4.  
  5. function scriptPath()
  6. {
  7.     var col = document.scripts;
  8.     return col[col.length - 1].src;
  9. }
  10.  
  11. function writeCSS(spath)
  12. {
  13.     var css = "";
  14.     var hxlinkPath = "";
  15.     var hxlink = "";
  16.     var hxlinkdefault = "";
  17.     // Get a CSS name based on the browser.
  18.     if (navigator.appName == "Microsoft Internet Explorer") {
  19.         var sVer = navigator.appVersion;
  20.         sVer = sVer.substring(0, sVer.indexOf("."));
  21.         if (sVer >= 4) {
  22.             document.writeln('<SCRIPT FOR="reftip" EVENT="onclick">window.event.cancelBubble = true;</SCRIPT>');
  23.             document.writeln('<SCRIPT FOR="cmd_lang" EVENT="onclick">langClick(this);</SCRIPT>');
  24.             document.writeln('<SCRIPT FOR="cmd_filter" EVENT=onclick>filterClick(this);</SCRIPT>');
  25.  
  26.             css = "vs70_5.css";
  27.             hxlinkPath = "ms-help://Hx/HxRuntime/"
  28.             hxlink = "HxLink.css";
  29.             hxlinkdefault = "HxLinkDefault.css";
  30.         }
  31.         else
  32.             css = "vs70_5.css";
  33.             hxlinkPath = "ms-help://Hx/HxRuntime/"
  34.             hxlink = "HxLink.css";
  35.             hxlinkdefault = "HxLinkDefault.css";
  36.     }
  37.  
  38.     // Insert CSS calls
  39.     spath = spath.toLowerCase();
  40.     spath = spath.replace(/vs70link.js/, "");
  41.     // Insert the Alink CSS
  42.     document.writeln('<LINK REL="stylesheet" HREF="' + hxlinkPath + hxlink + '">');
  43.     // The CSS is in the same directory as the script.
  44.     document.writeln('<LINK REL="stylesheet" HREF="' + spath + css + '">');
  45. //    document.writeln('<LINK REL="stylesheet" HREF="' + spath + hxlinkdefault + '">');
  46. }
  47.  
  48.